# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Caleb Cushing <xenoterracide@gmail.com>

pkgname=perl-capture-tiny
_realname=Capture-Tiny
pkgver=0.48
pkgrel=5
pkgdesc="Capture STDOUT and STDERR from Perl, XS or external programs"
arch=(any)
license=(PerlArtistic GPL)
depends=(perl)
url="https://metacpan.org/release/Capture-Tiny"
options=('!emptydirs')
source=("https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/$_realname-$pkgver.tar.gz")
sha256sums=('6c23113e87bad393308c90a207013e505f659274736638d8c79bac9c67cc3e19')

build() {
  cd $_realname-$pkgver
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd $_realname-$pkgver
  unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT
  export PERL_MM_USE_DEFAULT=1
  make test
}

package() {
  cd $_realname-$pkgver
  make DESTDIR="$pkgdir" install
}

# vim:set sw=2 et:
